classDiagram
    class Abstraction {
        <<interface>>
        -implementation: Implementation
        +setImplementation(Implementation) void
        +operation(): string
    }
    class RefinedAbstraction {
        -implementation: Implementation
        +setImplementation(Implementation) void
        +operation(): string
    }
    class Implementation {
        <<interface>>
        +execute(): string
    }
    class ConcreteImplementationA {
        +execute(): string
    }
    class ConcreteImplementationB {
        +execute(): string
    }

    Abstraction <|-- RefinedAbstraction
    Abstraction ..> Implementation : uses
    Implementation <|.. ConcreteImplementationA
    Implementation <|.. ConcreteImplementationB
    RefinedAbstraction ..> ConcreteImplementationA : uses
    RefinedAbstraction ..> ConcreteImplementationB : uses
